/*
ID: icerupt1
PROG: zerosum
LANG: C++11
*/

/*
 * 
*/
#include <fstream>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>

std::ifstream fin {"zerosum.in" };
std::ofstream fout{"zerosum.out"};

std::vector<std::string> ans;
int n;

bool judge(std::string s)
{
	int sum = 0, tmp = 0, last = 1;
	for (auto i : s) {
		if (i == '-') { sum += last * tmp;  tmp = 0; last = -1; }
		else
		if (i == '+') { sum += last * tmp;  tmp = 0; last = +1; }
		else
		if (i != ' ') { tmp = tmp * 10 + int(i - '0'); }
	}
	sum += last * tmp;
	return (!sum);
}

void dfs(int dep, std::string& s)
{
	if (dep >= n-1) {
		if (judge(s)) ans.push_back(s);
		return;
	}
	s[2 * dep + 1] = '+';
	dfs(dep+1, s);
	s[2 * dep + 1] = '-';
	dfs(dep+1, s);
	s[2 * dep + 1] = ' ';
	dfs(dep+1, s);
}

int main()
{
	fin >> n;
	std::string s = "1";
	for (int i = 2; i <= n; i++) { s += " "; s += char('0' + i); }
	dfs(0, s);
	std::sort(ans.begin(), ans.end());
	for (auto s : ans) {
		std::cout << s << '\n';
		fout << s << '\n';
	}
}
